package com.zz.framework.core.http

import com.zz.framework.core.Kernel
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

/**
 * Copyright © 2020 zanezhao All rights reserved.
 * Created by zanezhao on 2020/3/1 1:16 PM.
 * @author: zanezhao 1820022519@qq.com
 * @version: V1.0
 */

object BaseRetrofit {
    fun create(baseUrl: String): Retrofit {
        return Retrofit.Builder()
            .baseUrl(baseUrl)
            .addConverterFactory(GsonConverterFactory.create())
            .client(Kernel.retrofitConfig.initOkHttpClient())
            .build()
    }
}